package com.handler;

import com.ymx.darling.bean.entity.listener.SetListener;

/**
 * @author 爱Java的小于
 */
public class UserSetHandler implements SetListener {
    @Override
    public Object onSet(Object entity, String property, Object value) {
        // 为phone字段设置电话号码加密
        if ("userPhone".equals(property)) {
            return "*************";
        }
        return value;
    }
}
